package com.bc.bcapi.service;

import com.bc.bcapi.dao.T_File_upload_logMapper;
import com.bc.bcapi.dao.T_User_buyer_infoMapper;
import com.bc.bcmodel.domain.T_User_buyer_infoModel;
import com.bc.commonentity.common.DBContextDbType;
import com.bc.commonentity.common.DBContextHolder;
import com.bc.commonentity.common.JsonResult;
import com.bc.commonentity.enums.HttpReturnRnums;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.math.BigInteger;

import com.bc.bcapi.dao.T_Project_ceokycMapper;
import com.bc.bcmodel.domain.T_Project_ceokycModel;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Name T_Project_ceokycService * @Description * @Author generation * @Date 2018/8/21 13:03:11 * @Version 1.0
 **/
@Service
public class T_Project_ceokycService {
    @Resource
    T_Project_ceokycMapper t_Project_ceokycMapper;

    @Resource
    T_User_buyer_infoMapper t_user_buyer_infoMapper;
    @Resource
    T_File_upload_logService t_file_upload_logService;

    /**
     * 保存单条数据     *      * @return
     */

    public int insert(T_Project_ceokycModel req) {
        return t_Project_ceokycMapper.insert(req);
    }

    /**
     * 批量增加数据     *      * @return
     */

    public int insertBatch(List<T_Project_ceokycModel> req) {
        return t_Project_ceokycMapper.insertBatch(req);
    }

    /**
     * 根据对象属性查找满足条件的第一条数据     *      * @return
     */

    public T_Project_ceokycModel findByNamedParam(T_Project_ceokycModel req) {
        return t_Project_ceokycMapper.findByNamedParam(req);
    }

    /**
     * 根据对象查询所有数据     *      * @return
     */

    public List<T_Project_ceokycModel> getAllList(T_Project_ceokycModel req) {
        return t_Project_ceokycMapper.findByNamedParamList(req);
    }

    /**
     * 根据对象查询所有分页数据     *      * @return
     */

    public PageInfo<T_Project_ceokycModel> getList(T_Project_ceokycModel req) {
        PageHelper.startPage(req.getPage_index(), req.getPage_size());
        List<T_Project_ceokycModel> list = t_Project_ceokycMapper.findByNamedParamList(req);
        return new PageInfo<T_Project_ceokycModel>(list);
    }

    /**
     * 更新指定对象     *      * @return
     */

    public int update(T_Project_ceokycModel req) {
        return t_Project_ceokycMapper.update(req);
    }

    /**
     * 删除指定数据     *      * @return
     */

    public int delete(BigInteger id) {
        return t_Project_ceokycMapper.delete(id);
    }

    /**
     * 根据条件统计数据量     *      * @return
     */

    public long count(T_Project_ceokycModel req) {
        return t_Project_ceokycMapper.count(req);
    }



}